#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
  long a = 1;
  short  b = -1;
  printf("%#x %i %#x %i\n",a,a,b,b);    
  cout<<setw(8)<<hex<<a<<endl;
  cout<<setw(8)<<hex<<b<<endl;

  unsigned char c = -1;
  printf("%#x,%d \n",c,c);
  char ch = 0x81;
  printf("%#x,%d \n",ch,ch);
}